cc.Class({
    extends: cc.Component,

    properties: {
        // foo: {
        //    default: null,      // The default value will be used only when the component attaching
        //                           to a node for the first time
        //    url: cc.Texture2D,  // optional, default is typeof default
        //    serializable: true, // optional, default is true
        //    visible: true,      // optional, default is true
        //    displayName: 'Foo', // optional
        //    readonly: false,    // optional, default is false
        // },
        // ...
        
    },
    // use this for initialization
    onLoad: function () {             //随机出现地鼠的实现
       // this.color = cc.color(0,150,150);
      //  this.setColor(cc.color(150,150,150));
   //   cc.color(122,122,122);
    //  setColor = ccc3(255, 0, 0);//设置颜色为红色 
   // this.Color = cc.Color.BLACK;
  //  this.node.color = new cc.Color(0,255,0); 
  var  node = this.node;
  var children = node.children;                                    //此脚本未使用，可忽略。


    setInterval(function(){

//   var children = node.children;
   
var i = Math.floor(Math.random()*10);                     // 随机0-9 之间整数
     children[i].color = new cc.Color(0,0,255);   

     setTimeout(function() {
         children[i].color = new cc.Color(255,255,255);             
        }, 1000);

        },cc.random0To1()*5000);
    },
   


    // called every frame, uncomment this function to activate update callback
//     update: function (dt) {

 //    },
});
